<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>事件处理</title>
    <script src="../vue.js"></script>
</head>
<body>
<!--v-on:submit.prevent 表单提交阻止默认行为-->
<div id="app">
    <form action="" method="post" @submit.prevent="submit">
        <button v-on="submit">4444</button>
    </form>

    <button @click="count++">button{{count}}</button>
</div>
<script type="text/javascript">
    new Vue({
        el:"#app",
        data:{
            message:'456',
            count:0,
        },
        methods:{
            submit:function () {
                alert(1)
            },
            update:function () {
                console.log(this.count++);
            }
        }
    })
</script>
</body>
</html>